<template>
    <h3>搜索</h3>
    <input type="text" v-model="search">
</template>
<script>
export default{
    data(){
        return{
            search:''
        }
    },
    //声明这个，就不会有emit的warring
    emits: ['someEvent'],
    watch:{
        search(newValue,oldValue){
            this.$emit("someEvent",newValue)
        }

    }
}
</script>